import React from 'react'
import {Outlet,useNavigate} from 'react-router-dom'
export default function Home() {
  // 由navigate方法进行页面跳转的方式就叫做编程式路由导航
  const navigate = useNavigate()
  const jumpNewshandle =()=>{
    navigate('/main/home/news')
  }
  const jumpMusichandle = ()=>{
    navigate('/main/home/music')
  }
  return (
   <div>
     <h3>我是Home的内容</h3>
     <button onClick={jumpNewshandle}>News</button>
     <button onClick={jumpMusichandle}>Music</button>
     <Outlet />
   </div>
  )
}
